package view;

import controler.Controler_Acesso;
import controler.Controler_Usuario;

public class GUI_desktop extends javax.swing.JFrame {
    
    public Controler_Acesso control;

    public GUI_desktop() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlGeral = new javax.swing.JPanel();
        pnlCentral = new javax.swing.JPanel();
        jToolBar1 = new javax.swing.JToolBar();
        btnBotao = new javax.swing.JButton();
        btnBotao1 = new javax.swing.JButton();
        btnBotao3 = new javax.swing.JButton();
        btnBotao2 = new javax.swing.JButton();
        btnBotao4 = new javax.swing.JButton();
        btnBotao5 = new javax.swing.JButton();
        btnSair = new javax.swing.JButton();
        pnlRodape = new javax.swing.JPanel();
        lblUsuario = new javax.swing.JLabel();
        lblData = new javax.swing.JLabel();
        mnbMenu = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenuItem6 = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        mnuUsuario = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        jMenuItem8 = new javax.swing.JMenuItem();
        jMenuItem9 = new javax.swing.JMenuItem();
        jMenuItem10 = new javax.swing.JMenuItem();
        jMenu4 = new javax.swing.JMenu();
        jMenuItem11 = new javax.swing.JMenuItem();
        jMenu5 = new javax.swing.JMenu();
        jMenu6 = new javax.swing.JMenu();
        jMenuItem12 = new javax.swing.JMenuItem();
        jMenuItem13 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("MGS PDV");
        setResizable(false);

        pnlGeral.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102), 10));

        jToolBar1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102), 5));
        jToolBar1.setFloatable(false);

        btnBotao.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/32x32/user.png"))); // NOI18N
        btnBotao.setText("Cliente");
        btnBotao.setFocusable(false);
        btnBotao.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnBotao.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnBotao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBotaoActionPerformed(evt);
            }
        });
        jToolBar1.add(btnBotao);

        btnBotao1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/32x32/shipping.png"))); // NOI18N
        btnBotao1.setText("Produto");
        btnBotao1.setFocusable(false);
        btnBotao1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnBotao1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnBotao1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBotao1ActionPerformed(evt);
            }
        });
        jToolBar1.add(btnBotao1);

        btnBotao3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/32x32/project.png"))); // NOI18N
        btnBotao3.setText("Serviço");
        btnBotao3.setFocusable(false);
        btnBotao3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnBotao3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnBotao3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBotao3ActionPerformed(evt);
            }
        });
        jToolBar1.add(btnBotao3);

        btnBotao2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/32x32/customers.png"))); // NOI18N
        btnBotao2.setText("Fornecedor");
        btnBotao2.setFocusable(false);
        btnBotao2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnBotao2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnBotao2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBotao2ActionPerformed(evt);
            }
        });
        jToolBar1.add(btnBotao2);

        btnBotao4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/32x32/invoice.png"))); // NOI18N
        btnBotao4.setText("Orçamento");
        btnBotao4.setFocusable(false);
        btnBotao4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnBotao4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnBotao4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBotao4ActionPerformed(evt);
            }
        });
        jToolBar1.add(btnBotao4);

        btnBotao5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/32x32/customers.png"))); // NOI18N
        btnBotao5.setText("Pré-venda");
        btnBotao5.setFocusable(false);
        btnBotao5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnBotao5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnBotao5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBotao5ActionPerformed(evt);
            }
        });
        jToolBar1.add(btnBotao5);

        btnSair.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/32x32/logout.png"))); // NOI18N
        btnSair.setText("Sair");
        btnSair.setToolTipText("Enrerrar o sistema");
        btnSair.setFocusable(false);
        btnSair.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSairActionPerformed(evt);
            }
        });
        jToolBar1.add(btnSair);

        pnlRodape.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102), 3));

        lblUsuario.setText("Nome do operador");

        lblData.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblData.setText("Data e hora atual");

        javax.swing.GroupLayout pnlRodapeLayout = new javax.swing.GroupLayout(pnlRodape);
        pnlRodape.setLayout(pnlRodapeLayout);
        pnlRodapeLayout.setHorizontalGroup(
            pnlRodapeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlRodapeLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 454, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblData, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlRodapeLayout.setVerticalGroup(
            pnlRodapeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlRodapeLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addGroup(pnlRodapeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblData, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)
                    .addComponent(lblUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        javax.swing.GroupLayout pnlCentralLayout = new javax.swing.GroupLayout(pnlCentral);
        pnlCentral.setLayout(pnlCentralLayout);
        pnlCentralLayout.setHorizontalGroup(
            pnlCentralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCentralLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlCentralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 596, Short.MAX_VALUE)
                    .addComponent(pnlRodape, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnlCentralLayout.setVerticalGroup(
            pnlCentralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCentralLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 336, Short.MAX_VALUE)
                .addComponent(pnlRodape, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlGeralLayout = new javax.swing.GroupLayout(pnlGeral);
        pnlGeral.setLayout(pnlGeralLayout);
        pnlGeralLayout.setHorizontalGroup(
            pnlGeralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlCentral, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        pnlGeralLayout.setVerticalGroup(
            pnlGeralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlCentral, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        mnbMenu.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102), 3));

        jMenu1.setText("Cadastros");

        jMenuItem1.setText("Grupo");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem1);

        jMenuItem2.setText("Categoria");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem2);

        jMenuItem3.setText("Produto");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem3);

        jMenuItem4.setText("Cliente");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem4);

        jMenuItem5.setText("Fornecedor");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem5);

        jMenuItem6.setText("Centro de custo");
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem6ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem6);

        mnbMenu.add(jMenu1);

        jMenu2.setText("Manutenção");

        mnuUsuario.setText("Usuário");
        mnuUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuUsuarioActionPerformed(evt);
            }
        });
        jMenu2.add(mnuUsuario);

        mnbMenu.add(jMenu2);

        jMenu3.setText("Gerencial");

        jMenuItem8.setText("Abertura de Caixa");
        jMenu3.add(jMenuItem8);

        jMenuItem9.setForeground(new java.awt.Color(255, 0, 0));
        jMenuItem9.setText("Fechamento de Caixa");
        jMenu3.add(jMenuItem9);

        jMenuItem10.setForeground(new java.awt.Color(255, 0, 0));
        jMenuItem10.setText("Sangria");
        jMenu3.add(jMenuItem10);

        mnbMenu.add(jMenu3);

        jMenu4.setText("Vendas");

        jMenuItem11.setText("Nova venda");
        jMenu4.add(jMenuItem11);

        mnbMenu.add(jMenu4);

        jMenu5.setText("Fiscal");
        mnbMenu.add(jMenu5);

        jMenu6.setText("Estoque");

        jMenuItem12.setText("Entrada de estoque");
        jMenu6.add(jMenuItem12);

        jMenuItem13.setText("Retirada de estoque");
        jMenu6.add(jMenuItem13);

        mnbMenu.add(jMenu6);

        setJMenuBar(mnbMenu);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlGeral, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlGeral, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenuItem6ActionPerformed

    private void btnBotaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBotaoActionPerformed
        
        new GUI_confirm(this, true).setVisible(true);
        
    }//GEN-LAST:event_btnBotaoActionPerformed

    private void btnBotao1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBotao1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnBotao1ActionPerformed

    private void btnBotao2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBotao2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnBotao2ActionPerformed

    private void btnBotao3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBotao3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnBotao3ActionPerformed

    private void btnBotao4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBotao4ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnBotao4ActionPerformed

    private void btnBotao5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBotao5ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnBotao5ActionPerformed

    private void btnSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSairActionPerformed

        System.exit(0);
        
    }//GEN-LAST:event_btnSairActionPerformed

    private void mnuUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuUsuarioActionPerformed

        new Controler_Usuario().initForm(this);
        
    }//GEN-LAST:event_mnuUsuarioActionPerformed

    public static void main(String args[]) {
        
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Metal".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(GUI_desktop.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(GUI_desktop.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(GUI_desktop.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(GUI_desktop.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new GUI_desktop().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton btnBotao;
    public javax.swing.JButton btnBotao1;
    public javax.swing.JButton btnBotao2;
    public javax.swing.JButton btnBotao3;
    public javax.swing.JButton btnBotao4;
    public javax.swing.JButton btnBotao5;
    public javax.swing.JButton btnSair;
    public javax.swing.JMenu jMenu1;
    public javax.swing.JMenu jMenu2;
    public javax.swing.JMenu jMenu3;
    public javax.swing.JMenu jMenu4;
    public javax.swing.JMenu jMenu5;
    public javax.swing.JMenu jMenu6;
    public javax.swing.JMenuItem jMenuItem1;
    public javax.swing.JMenuItem jMenuItem10;
    public javax.swing.JMenuItem jMenuItem11;
    public javax.swing.JMenuItem jMenuItem12;
    public javax.swing.JMenuItem jMenuItem13;
    public javax.swing.JMenuItem jMenuItem2;
    public javax.swing.JMenuItem jMenuItem3;
    public javax.swing.JMenuItem jMenuItem4;
    public javax.swing.JMenuItem jMenuItem5;
    public javax.swing.JMenuItem jMenuItem6;
    public javax.swing.JMenuItem jMenuItem8;
    public javax.swing.JMenuItem jMenuItem9;
    public javax.swing.JToolBar jToolBar1;
    public javax.swing.JLabel lblData;
    public javax.swing.JLabel lblUsuario;
    public javax.swing.JMenuBar mnbMenu;
    public javax.swing.JMenuItem mnuUsuario;
    public javax.swing.JPanel pnlCentral;
    public javax.swing.JPanel pnlGeral;
    public javax.swing.JPanel pnlRodape;
    // End of variables declaration//GEN-END:variables

}//CLASS
